<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">
<title>用户管理信息修改</title>
</head>
<body>
	<form id="user-view-form">
		<div class="datagrid-body">
			<table class="datagrid-btable" cellspacing="0" cellpadding="0"
				border="0" style="width: 100%;">
				<tbody>
					 <tr class="datagrid-row">
						<td
							style="border-style: solid; width: 20%; text-align: right; padding-right: 7px">部门名称</td>
						<td style="border-style: solid; width: 30%; text-align: left;">
<!-- 							<input type="text" name="deptName" -->
<!-- 							class="easyui-validatebox" style="width: 230px"> -->
							<input style="width: 230px;" name="departmentNum" class="easyui-combobox" data-options="url:'departmentServlet.do?method=queryAll',textField:'departmentName',valueField:'departmentNum',required:true">
						</td>
					</tr>
        
					<tr class="datagrid-row">
						<td
							style="border-style: solid; text-align: right; padding-right: 7px">用户登录编码</td>
						<td style="border-style: solid; text-align: left;">
							
							<input type="text" name="userNum" 
							class="easyui-validatebox"  style="width: 230px">
						</td>
					</tr>
					<tr class="datagrid-row">
						<td
							style="border-style: solid; text-align: right; padding-right: 7px">用户昵称</td>
						<td style="border-style: solid; text-align: left;">
							<input type="text" name="userName"
							class="easyui-validatebox" style="width: 230px">
						</td>
					</tr>
					<tr class="datagrid-row">
						<td
							style="border-style: solid; text-align: right; padding-right: 7px">创建时间</td>
						<td style="border-style: solid; text-align: left;">
							<input type="text" name="createTime"
							class="easyui-validatebox" style="width: 230px">
						</td>
					</tr>
					<tr class="datagrid-row">
						<td
							style="border-style: solid; text-align: right; padding-right: 7px">创建人</td>
						<td style="border-style: solid; text-align: left;">
							<input type="text" name="createName"
							class="easyui-validatebox" style="width: 230px">
						</td>
					</tr>
					<tr class="datagrid-row">
						<td
							style="border-style: solid; text-align: right; padding-right: 7px">修改时间</td>
						<td style="border-style: solid; text-align: left;">
							<input type="text" name="updateTime"
							class="easyui-validatebox" style="width: 230px">
						</td>
					</tr>
					<tr class="datagrid-row">
						<td
							style="border-style: solid; text-align: right; padding-right: 7px">修改人</td>
						<td style="border-style: solid; text-align: left;">
							<input type="text" name="updateName"
							class="easyui-validatebox" style="width: 230px">
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	</form>
<script type="text/javascript">

function getQueryParam(name) {
	debugger;
    var obj = $('#common-dialog').dialog('options');
    var queryParams = obj["queryParams"];
    return queryParams[name];
}
//自动填充值

function autoInput(obj){

 	$.each(obj, function(i, n){
	  //from 下的input
		if(i=="createTime"||i=="updateTime"){
			n = formatDateTime(n);
		}
 		$("#user-view-form input[name="+i+"]").textbox({value:n});
	 //$("#coache-div-detail #"+i).html(n);
	});
}


$(function(){
	var _id  =getQueryParam("id");
	$.getJSON("userServlet.do?method=edit",{id:_id},function(json){
		//自动添值
		autoInput(json);
	});	 
	$('#user-view-form input').attr('disabled','true')
 });
</script>
</script>
</body>
</html>